//
//  Constants.swift
//  SLQuickReader
//
//  Created by ALin on 2017/8/2.
//  Copyright © 2017年 ALin. All rights reserved.
//

import UIKit

// MARK:- Base Url
// 图片的前缀
let BaseImgApi =  "http://statics.zhuishushenqi.com"
// API的前缀
let BaseApi = "http://api.zhuishushenqi.com"

// MARK:- Double

let screenWidth = UIScreen.main.bounds.size.width
let screenHeight = UIScreen.main.bounds.size.height

let bookstore_segmentedControl_w = 3.0 * screenWidth / 5.0

let margin1px = 1.0 / UIScreen.main.scale

// MARK:- notify name
let BookStoreTapStatisticsNotify = "bookStoreTapStatisticsNotify"
let UserInfo = "userInfo"



// MARK:- View
extension UIView
{
    var x : CGFloat{
        set(ox){
           frame.origin.x = ox
        }
        get{
            return frame.origin.x
        }
    }
    
    var y : CGFloat{
        set(oy){
            frame.origin.y = oy
        }
        get{
            return frame.origin.y
        }
    }
    
    var width : CGFloat{
        set(sw){
            frame.size.width = sw
        }
        get{
            return frame.size.width
        }
    }
    
    var height : CGFloat{
        set(sh){
            frame.size.height = sh
        }
        get{
            return frame.size.height
        }
    }
    
    var centerX : CGFloat{
        set(cx){
            center.x = cx
        }
        get{
            return center.x
        }
    }
    
    var centerY : CGFloat{
        set(cy){
            center.y = cy
        }
        get{
            return center.y
        }
    }
}


